/***************************************************************************
 *   Copyright (C) 2008 by BogDan Vatra                                    *
 *   bogdan@licentia.eu                                                    *
 *                                                                         *
 *   This program is free software: you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/

#ifndef QUERYLOCATESELECTIONMODEL_H
#define QUERYLOCATESELECTIONMODEL_H

#include <QItemSelectionModel>
#include "win32def.h"

namespace SQL
{

/**
	@author BogDan Vatra <taipan@omnidatagrup.ro>
*/
class Query;

class QueryLocateSelectionModel : public QItemSelectionModel
{
	Q_OBJECT

public:
	QueryLocateSelectionModel( QAbstractItemModel * model, Query *query, const QString & firstFieldName, bool sorted, QObject * parent);

private slots:
	void indexChanged( const QModelIndex & current, const QModelIndex & previous );

private:
	Query * m_query;
	QString m_firstFieldName;
	bool m_sorted;
};

}
#endif // QUERYLOCATESELECTIONMODEL_H
